<template>
  <view class="container">
    <view class="form">
      <view class="logo">
        <image src="/static/xiaozhi.png" shape="circle" width="200rpx" height="200rpx"></image>
      </view>
      <view class="title">医智捷行</view>
      <view class="desc">智能捷行，为您指引，轻松就医，智能相伴！</view>
      <view class="btn-group">
        <view class="btn" v-on:click="onToForm">
          <button shape="circle" iconfontColor="#ffffff" color="#1373E9" iconfont="chat-fill">智能导诊</button>
        </view>
		<view class="btn" v-on:click="onwenyao">
		  <button shape="circle" iconfontColor="#ffffff" color="#1373E9" iconfont="weixin-fill">优先挂号</button>
		</view>
        <view class="btn" v-on:click="onwenbing">
          <button shape="circle" iconfontColor="#ffffff" color="#1373E9" iconfont="weixin-fill">在线挂号</button>
        </view>
        <view class="btn" v-on:click="onreport">
          <button shape="circle" iconfontColor="#ffffff" color="#1373E9" iconfont="weixin-fill">报告解析</button>
        </view>
        <view class="btn" v-on:click="agreement">
          <button open-type='contact' color="#1373E9" :plain="true">咨询客服(意见反馈)</button>
        </view>
      </view>
    </view>
  </view>
</template>

<script>
export default {
  data() {
    return {
      admin: false
    };
  },
  methods: {
    toMiniProgram(appId) {
      uni.navigateToMiniProgram({
        appId: appId,
        success(res) {
          // 打开成功
        }
      })
    },
	//智能导诊
    onToForm() {
      uni.navigateTo({
        url: '/pages/onToForm/onToForm'
      })
    },
	//智能问药
    onwenyao() {
      uni.navigateTo({
        url: '/pages/onwenyao/onwenyao'
      })
    },
	//报告解读
	onreport() {
	  uni.navigateTo({
	    url: '/pages/onreport/onreport'
	  })
	},
	//智能问病
	onwenbing() {
	  uni.navigateTo({
	    url: '/pages/hospital/hospital'
	  })
	},
	agreement(){
		uni.navigateTo({
		  url: '/pages/agreement/agreement'
		})
	},
	//我的页面
    goToMy() {
      uni.navigateTo({
        url: '/pages/user/user'
      })
    }
  }
}
</script>

<style lang="scss">
.container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 10;
  margin-top: 0;

  .title {
    font-size: 38rpx;
    font-weight: bolder;
    margin-top: 15rpx;
    text-align: center;
  }

  .desc {
    margin-top: 15rpx;
    font-size: 28rpx;
    color: #666;
    text-align: center;
  }

  .btn-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 80%;
    margin-top: 10px;
	margin-left: 30px;
    gap: 10px;

    .btn {
      width: 100%;
      text-align: center;
      margin-bottom: 10px;

      button {
        width: 100%;
        padding: 10px 10; 
        background-color: #1373E9; 
        color: #ffffff; 
        font-size: 30rpx; 
        border: none;
      }

      // 突出“智能导诊”按钮
      &:first-child {
        button {
          background-color: #ff9900; 
          color: #ffffff; 
          font-size: 44rpx; 
		  font-weight: 17rpx;
          box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); 
          margin-bottom: 20px; 
        }
      }
    }

    // 最后一个按钮的样式
    .btn:last-child {
      margin-bottom: 0;
	  background-color: non;
    }
  }

  .tabbar {
    display: flex;
    justify-content: center;
    margin-top: 20px;
  }
}
</style>
